Integrated memory controller

ABSTRACT

A memory system includes Synchronous Dynamic Random Access Memory (SDRAM) A memory controller communicates with the memory, generates an SDRAM clock signal, that receives a bi-directional sampling clock signal (DQS) that is generated based on the SDRAM clock signal, and reads data from the memory based on the DQS.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a Continuation of U.S. patent application Ser. No. 11/542,862, filed Oct. 4, 2006, now U.S. Pat. No. 7,286,441 which is a continuation of U.S. patent application Ser. No. 10/867,113 filed on Jun. 14, 2004 now U.S. Pat. No. 7,120,084. The disclosures of the above applications are incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates generally to storage device controllers, and more particularly, to integrated memory controllers.

2. Background

Conventional computer systems typically include several functional components. These components may include a central processing unit (CPU), main memory, input/output (“I/O”) devices, and streaming storage devices (for example, tape drives) (referred to herein as “storage device”). In conventional systems, the main memory is coupled to the CPU via a system bus or a local memory bus. The main memory is used to provide the CPU access to data and/or program information that is stored in main memory at execution time. Typically, the main memory is composed of random access memory (RAM) circuits. A computer system with the CPU and main memory is often referred to as a host system.

The storage device is coupled to the host system via a controller that handles complex details of interfacing the storage devices to the host system. Communications between the host system and the controller is usually provided using one of a variety of standard I/O bus interfaces.

Typically, when data is read from a storage device, a host system sends a read command to the controller, which stores the read command into the buffer memory. Data is read from the device and stored in the buffer memory.

Buffer memory may be a Synchronous Dynamic Random access Memory (“SDRAM”), or Double Data Rate-Synchronous Dynamic Random Access Memory (referred to as “DDR”). In SDRAM communication occurs at the positive end of a clock signal, i.e. data is received and read at the positive edge of a clock. Hence, SDRAM is a single data rate memory device.

DDR is a type of SDRAM that supports data transfers on both edges of each clock cycle (the rising and falling edges), effectively doubling the memory chip's data throughput. In DDR address and commands are similar to SDRAM, but the data is handled differently by using a separate clock (“DQS”). DQS is used for receiving and sending data from the DDR.

Modern storage systems may use either SDRAM or DDR and it is desirable to have a single interface that supports both DDR and SDRAM read and write operations. Conventional systems do not provide this option.

Therefore, there is a need for a method and system to support both DDR and SDRAM using the same hardware in the controller.

SUMMARY OF THE INVENTION

A system for writing data to a buffer memory, which is Synchronous Dynamic Random access Memory (“SDRAM”), or Double Data Rate-Synchronous Dynamic Random Access Memory (“DDR”) is provided. The system includes, means for managing programmable clock signal relationships such that data arrives at an optimum time for writing. Data that is to be written at DDR is moved from a first buffer clock to a DDR write clock and to a DQS signal that is based on a SDRAM clock signal.

A circuit for writing data to a buffer memory, which is Synchronous Dynamic Random access Memory (“SDRAM”), or Double Data Rate-Synchronous Dynamic Random Access Memory (“DDR”) is provided. The circuit includes logic for managing programmable clock signal relationships such that data arrives at an optimum time for writing. Data that is to be written at DDR is moved from a first buffer clock to a DDR write clock signal and to a DQS signal that is based on a SDRAM clock signal. Also, plural tap-cells may be used to delay clock signals such that data and clock signals are aligned.

A circuit for reading data from a buffer memory, which is Synchronous Dynamic Random access Memory (“SDRAM”), or Double Data Rate-Synchronous Dynamic Random Access Memory (“DDR”) is provided. The circuit includes logic for managing programmable clock signal relationships such that data that is read from the DDR is centered within a DQS signal, which is generated from the DDR and then appropriately delayed. The DQS signal is delayed with respect to the data that is read from the DDR and data from the DDR is placed in a register that is controlled by a delayed DQS signal.

A system for reading data from a buffer memory, which is Synchronous Dynamic Random access Memory (“SDRAM”), or Double Data Rate-Synchronous Dynamic Random Access Memory (“DDR”) is provided. The system includes means for managing programmable clock signal relationships such that data that is read from the DDR is centered within a DQS signal generated from the DDR and then appropriately delayed. The DQS signal is delayed with respect to the data that is read from the DDR and data from the DDR is placed in a register that is controlled by a delayed DQS signal. Also, an emulated DQS signal in an SDRAM clock signal is used for reading from a SDRAM and a DDR capture scheme is used for reading data from an SDRAM.

This brief summary has been provided so that the nature of the invention may be understood quickly. A more complete understanding of the invention can be obtained by reference to the following detailed description of the preferred embodiments thereof concerning the attached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

The foregoing features and other features of the present invention will now be described with reference to the drawings of a preferred embodiment. In the drawings, the same components have the same reference numerals. The illustrated embodiment is intended to illustrate, but not to limit the invention. The drawings include the following Figures:

FIG. 1A is an example of a streaming storage drive system used according to one aspect of the present invention;

FIG. 1B is a block diagram of a buffer controller, according to one aspect of the present invention;

FIG. 1C is a block diagram of a clock distribution module, according to one aspect of the present invention;

FIG. 1D is a block diagram of a DDR memory coupled to a controller, according to one aspect of the present invention;

FIG. 1E shows a SDRAM coupled to a controller, according to one aspect of the present invention;

FIG. 1F shows a timing diagram for SDRAM signals,

FIG. 1G shows DDR write signals used according to one aspect of the present invention;

FIG. 1H is a block diagram showing an emulated DQS signal for an SDRAM operation, according to one aspect of the present invention;

FIG. 2 shows DDR logic that can also be used for SDRAM read operations using an emulated DQS signal, according to one aspect of the present invention;

FIGS. 3-6 show various timing diagrams, according to one aspect of the present invention;

FIG. 7 shows a logic diagram for write operation, according to one aspect of the present invention; and

FIGS. 8-9 show timing diagrams, according to one aspect of the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

To facilitate an understanding of the preferred embodiment, the general architecture and operation of a controller will initially be described. The specific architecture and operation of the preferred embodiment will then be described with reference to the general architecture.

The system of FIG. 1A is an example of a streaming storage drive system (e.g., tape drive), included (or coupled to) in a computer system. The host computer (not shown) and the storage device 115 communicate via port 102, which is connected to a data bus (not shown). The data bus, for example, is a bus in accordance with a Small Computer System Interface (SCSI) specification. Those skilled in the art will appreciate that other communication buses known in the art can be used to transfer data between the drive and the host system. In an alternate embodiment (not shown), the storage device 115 is an external storage device, which is connected to the host computer via a data bus.

As shown in FIG. 1A, the system includes controller 101, which is coupled to SCSI port 102, port 114, buffer memory 111 and microprocessor 100. Interface 118 serves to couple microprocessor bus 107 to microprocessor 100. A read only memory (“ROM”) omitted from the drawing is used to store firmware code executed by microprocessor 100. Port 114 couples controller 101 to device 115.

Controller 101 can be an integrated circuit (IC) that comprises of various functional modules, which provide for the writing and reading of data stored on storage device 115. Microprocessor 100 is coupled to controller 101 via interface 118 to facilitate transfer of data, address, timing and control information. Buffer memory 111 is coupled to controller 101 via ports to facilitate transfer of data, timing and address information. Buffer memory 111 may be a DDR or SDRAM.

Data flow controller 116 is connected to microprocessor bus 107 and to buffer controller 108. A DMA interface 112 is connected to microprocessor bus 107 and to data and control port 113.

SCSI controller 105 includes programmable registers and state machine sequencers that interface with SCSI port 102 on one side and to a fast, buffered direct memory access (DMA) channel on the other side.

Sequencer 106 supports customized SCSI sequences, for example, by means of a 256-location instruction memory that enables users to customize command automation features. Sequencer 106 support's firmware and hardware interrupts schemes. The firmware interrupt enables microprocessor 100 to initiate an operation within Sequencer 106 without stopping sequencer operation. Hardware interrupt comes directly from SCSI controller 105.

Buffer controller (also referred to as “BC”) 108 connects to buffer memory 111, DMA I/F 112, a SCSI channel of SCSI controller 105 and bus 107. Buffer controller 108 regulates data movement into and out of buffer memory 111.

To read data from storage device 115, a host system sends a read command to controller 101, which stores the read, commands in buffer memory 111. Microprocessor 100 then read the command out of buffer memory 111 and initializes the various functional blocks of controller 101. Data is read from device 115 and is passed through DMA I/F 112 to buffer controller 108.

Controller 101 also includes a clock distribution module (“CDM”) 120 that handles clock variation, according to one aspect of the present invention. FIG. 1C shows a block diagram of CDM 120 with an oscillator 119 coupled to phased locked loop (“PLL”) 120A that includes an electronic circuit that controls oscillator 119 so that it maintains a constant phase angle (i.e., lock) on the frequency of an input, or reference, signal. PLL 120A is coupled to a voltage regulator (“VCO”) 703 and to clock distribution logic (“CDL”) 121 that generates a buffer clock (“BUFCLK”) 701A.

FIG. 1B shows a block diagram of BC 108 with Channel 1 108A and Channel 0 108D for moving data to and from buffer 111. BC 108 includes registers 108E and an Arbiter 108C. Arbiter 108C arbitrates between plural channels in BC 108, for example, Channel 0 108D and Channel 1 108A. Register 108E is coupled to interface 118 via bus 107 that allows microprocessor 100 and BC 108 to communicate. Data 108G and status 108F is moved in and out of register 108E.

BC 108 also includes a multi-channel memory controller 108B that provides a common interface to either SDRAM or DDR buffer memory 111.

Before describing the adaptive aspects of the present invention, the following describes some of the clock signals that are used for buffer 111 read and write operations:

BUFCLK (Buffer Clock Signal): This is a clock signal that is used for running various modules of the memory controller 108B.

SDRAMCLK (SDRAM Clock Signal): This is a clock signal for SDRAM 111B.

DQS: This signal is used for sampling data.

DDR Write CLK: This clock signal is used for writing to DDR 111A:

BD_O: This is a buffer data output signal.

FIG. 1D shows a top-level diagram where DDR 111A is the buffer memory 111. SDRAMCLK generated from controller 101 is sent to DDR 111A, while DQS (that is based on SDRAM CLK) and data comes from DDR 111A for a read operation. For a write operation, DQS is sent to DDR 111A, as described below in detail. As stated above, DQS is a bi-directional signal.

FIG. 1E shows a block diagram where SDRAM 111B is coupled to controller 101. Data (“BD”) is read from SDRAM 111B and SDRAM clock is sent from controller 101. Data (“BD”) moves bi0directionally from to/from SDRAM 111B.

In one aspect of the present invention, a system is provided such that a buffer clock (BUFFCLCK), SDRAM clock (SDRAMCLK) and a DDR data clock (“DQS”) are handled in such a way that the same system (or logic) can be used to support either a DDR or SDRAM version of buffer memory 111.

DDR Write Operation:

In one aspect of the present invention a DDR write operation is conducted using programmable delay so that data arrives at the correct time outside controller 101. Data that is to be written at DDR 111A is moved from BUFCLK to DDR Write CLK, and DQS is appropriately delayed for data sampling, as discussed below.

FIG. 7 shows a schematic of the logic used for a DDR write operation. It is noteworthy that the same logic is used for SDRAM write operation.

For DDR write, all signals go from controller 101 to DDR 111A. The arrival time for data and DQS signal 718 are based on the timing diagram shown in FIG. 8. The clocks are aligned such that data lines up with the clock. The present invention uses a clocking relationship instead of delaying data. The programmable timing delays between BUFCLK 701A, SDRAMCLK 707, and DQS CLK 718 are provided by tap-cells 702, 704, 704B and 705 that are driven by voltage controlled oscillator (“VCO”) 703.

Data that is written in DDR 111A is stored in registers 711 and 712 that are controlled by BUFCLK 701A using logic 710. In one aspect, registers 711 and 712 are 64 bits wide to hold data. Data from registers 711 and 712 (shown as 712A and 712B via logic 711A and 711B) is moved to registers 713 and 714 that receive the DDR Write CLk 720 from tap cell 702. Signal 720 may be delayed using cell 702A.

BD_O 715 (data output) is generated based on inputs 713A and 714A from registers 713 and 714 (via multiplexer 715A), respectively.

Input/Output (“I/O”) cell 724 generates BD 716, which is the actual data that is sent to DDR 111A.

DQS_O (DQS output) signal 719 is generated based on DQS free running signal 704A generated from tap cell 704 and 701B signal from DQS enable logic 701. DQS enable logic 701 receives BUFCLK 701A and generates signal 701B to enable the DQS signal. Signal 704A and 701B are “ANDED” by gate 720A to generate DQS_O 719. Thereafter, DQS_O 719 is sent to I/O cell 723 that generates DQS 718 that is sent to DDR 111A.

SDRAMCLK 707 is generated by input/output (I/O) cell 721 based on signal 706 generated (or delayed using cell 705A) by tap cell 705.

Control address logic 709 receives BUFCLK 701A and delay signal 708 from tap-cell 704B. I/O cell 722 generates control address 722A that is sent to DDR 111A that determines where data is written.

FIG. 8 shows a timing diagram of various signals from FIG. 7, according to the adaptive aspects of the present invention. FIG. 8 shows that SDRAMCLK 707 and BUFCLK 701A are synchronous. Output I/O cell delay 707A is based on I/O cell 721. BD_O delay is based on I/O cell 724. tDH (718A) is the DDR data hold time based on DQS 718 for DDR writes, while tDS (718B) is the data setup time based on DQS 718 for DDR writes. CLSK 707B is the clock skew between BUFCLK 701A and SDRAMCLK 707. IDQSS 718C is the first DQS rising edge for DDR write bursts, while tWPRE 718D is the time that DQS 718 is low before the first rising edge. TWPST 718E is the time DQS 718 is low after the last DQS 718 falling edge. DDR data (shown as BD 716 in FIG. 7) 716 is sampled (D0) at the rising edge of DQS 718 and D1 is sampled at the falling edge of 718.

BUFCLK 701A is re-timed to DDR write clock 720 that is generated by tap cell 702. DQS 718 is aligned to the center of BD_O 715. DQS signal 718 is timed so that it is later than SDRAMCLK_O 706 to provide set-up time from the start of the “data valid” window. The negative edge of BUFFCLK 701A is used to control the enabling of DQS_O clock 719. The timing for DQS 718 is optimum so that it is not too early or late.

FIG. 8A shows a simplified timing diagram with SDRAMCLK 707, DQS 718 and data 716 signals. FIG. 8A shows that data 716 is sampled at the rising and falling edge of DQS 718 and DQS 718 is approximately in the middle of data 716.

FIG. 1G shows yet another simplified timing diagram showing how DQS 718 and data 716 are positioned for DDR 111A write operation.

DDR Read Operation:

FIG. 2 shows a schematic of the logic that is used for reading data from DDR 111A and SDRAM 111B. DQS 209 and data 206 are generated from DDR 111A. The DQS 209 clock signal is generated based on SDRAMCLK 707, which is based on input 706 to I/O cell 721. DQS 209 clock signal is sent to I/O cell 208 that generates DQS_I 210, which is delayed by cell 211. DQS 209 is delayed so that the DQS clock signal is centered within a valid data window.

Registers 202 and 202A are used to capture data and in one aspect operate as a first in first out (“FIFO”) buffer. The delayed DQS 211A signal that is referenced as BDIN_CLK 212 and 212B (that is generated after 211A passes through an inverter 211B) is used to control registers 202 and 202A, respectively. It is noteworthy that the delay in the DQS signal may be programmed using cells 211C and 211D by controller 101 firmware.

Data 206 from DDR 111A via I/O cell 205 (as output BD_I 207) is sent to registers 202 and 202A, via logic 207A and 207B. Once data is captured in registers 202 and 202A, it is moved (shown as 213 and 214) to another FIFO 201 that operates under BUFCLK 701A.

DQS 209 generated from DDR 111A may have plural alignments. Logic 203 and 204 controls the alignment of DQS 209 based on selected latency. For example, in one aspect (CL3, FIG. 3), the positive edge of DQS is aligned with the positive edge of SDRAMCLK 707 generated by I/O cell 721 based on SDRAMCLK_O 706, which is generated by VCO 703. In another aspect (CL2.5, FIG. 3), the negative edge of DQS is aligned with the negative edge. FIG. 3 shows alignment of data with SDRAMCLK 707 within +/− tAC nano-seconds.

FIG. 4 shows the alignment of DQS 211A to SDRAMCLK 707 with latency CL 3 and CL 2.5, respectively. In CL3, the positive edge of DQS 211A is aligned with the positive edge of SDRAMCLK and in CL 2.5, the negative edge of DQS 211A is aligned with the positive edge of SDRAMCLK 707. In CL 3, the first data of the burst is valid 3 clocks after the rising edge of the read command. In CL 2.5, the first data of the burst is valid 2.5 clocks after the rising edge of the read command. The rising edge of DQS 211A is lined up with the leading edge of the first valid data window.

DQS 211A can vary by tDQSCK 400. Although the alignment of DQS 211A to SDRAMCLK 707 does not directly affect the loading of data into registers 202 and 202A, it does affect the positioning of BDIN_REG CLK 212 with respect to BUFCLK 701A.

FIG. 5 shows a timing diagram of DQS 211A and data 207. In this case DQS 211A can vary by tDQSQ 500 nano-seconds.

FIG. 6 shows the timing for data capture, where DQS 211A is delayed to provide setup/hold margin between clock and data inputs of registers 202 and 202A. “TDQSQ” is the data skew from DQS 211A, “tPDIN” is the I/O cell delay to destination, and “tDQSPD” is additional delay for DQS 211A.

SDRAM Write Operation:

SDRAM 111B write SDRAM CLK 707 that operates synchronously with BUFCLK 701A controls operation. SDRAM CLK 707 may be delayed from BUFCLK 701A to gain some set-up and hold time for the read operation. FIG. 1F shows a timing diagram for writing data to SDRAM 111B.

SDRAM Read Operation:

FIG. 1H shows a top-level block diagram for an SDRAM 111B operation using the same logic for controller 101. DQS signal is emulated for an SDRAM 111B read operation. The SDRAM clock 707 is fed into the DQS signal, which then becomes the emulated DQS signal. For an SDRAM 111B read operation, only the positive edge flop 202 (also shown in FIG. 2) is used. For a DDR operation both 202 and 202A are used. By using the SDRAM clock 707 and the emulated DQS signal, extra logic is not required and hence this saves overall cost for controller 101.

SDRAM read operation is synchronous with SDRAMCLK 707 and BUFCLK 701A. In some instances, for example, at 183 MHZ, the data read delay (tSDRAC) from SDRAM 111B is equal to the clock period. FIG. 9 shows the timing diagram for SDRAM 111B read operation at 183 MHz. It is noteworthy that the present invention is not limited to any particular frequency rate. FIG. 9 shows SDRAMCLK 707, BUFCLK 701A, data (“BD”) and BDIN Clock signal (derived from BUFCLK). “tSDRAC” is the time SDRAM 111B data read output delay; “tSDROH” is the SDRAM data read output data hold-time; and “tPDIN” is the input I/O cell delay to destination.

In one aspect of the present invention, the same logic is used to read and/or write data to DDR or SDRAM, hence overall controller cost is reduced.

Although the present invention has been described with reference to specific embodiments, these embodiments are illustrative only and not limiting. Many other applications and embodiments of the present invention will be apparent in light of this disclosure. 

1. A memory system comprising: memory that includes Synchronous Dynamic Random Access Memory (SDRAM); and a memory controller that: communicates with the memory; generates an SDRAM clock signal; receives a bi-directional sampling clock signal (DQS) that is generated based on the SDRAM clock signal; and reads data from the memory based on the DQS, wherein the memory controller generates the SDRAM clock signal based on a buffer clock signal.
 2. The memory system of claim 1 wherein the memory controller reads the data from the SDRAM further based on at least one of the SDRAM clock signal and the buffer clock signal.
 3. The memory system of claim 1 wherein the memory controller writes the data to the SDRAM based on at least one of the SDRAM clock signal and the buffer clock signal.
 4. The memory system of claim 1 further comprising a clock distribution module that generates the buffer clock signal.
 5. A memory system comprising: memory that includes Synchronous Dynamic Random Access Memory (SDRAM); and a memory controller that: communicates with the memory; generates an SDRAM clock signal; receives a bi-directional sampling clock signal (DQS) that is generated based on the SDRAM clock signal; and reads data from the memory based on the DQS. wherein the SDRAM clock signal emulates the DQS.
 6. A memory system comprising: memory that includes Synchronous Dynamic Random Access Memory (SDRAM); a memory controller that: communicates with the memory; generates an SDRAM clock signal; receives a bi-directional sampling clock signal (DQS) that is generated based on the SDRAM clock signal; and reads data from the memory based on the DQS; and logic that is connected between the memory and the memory controller and that aligns the DQS to the data based on a delay.
 7. The memory system of claim 6 wherein the logic includes at least one programmable delay element.
 8. A memory system comprising: memory means for including Synchronous Dynamic Random Access Memory (SDRAM); and memory controller means for communicating with the memory means, for generating an SDRAM clock signal, for receiving a bi-directional sampling clock signal (DQS) that is generated based on the SDRAM clock signal, and for reading data from the memory means based on the DQS, wherein the memory controller means generates the SDRAM clock signal based on a buffer clock signal.
 9. The memory system of claim 8 wherein the memory controller means reads the data from the SDRAM further based on at least one of the SDRAM clock signal and the buffer clock signal.
 10. The memory system of claim 8 wherein the memory controller means writes the data to the SDRAM based on at least one of the SDRAM clock signal and the buffer clock signal.
 11. The memory system of claim 8 further comprising clock distribution means for generating the buffer clock signal.
 12. A memory system comprising: memory means for including Synchronous Dynamic Random Access Memory (SDRAM); and memory controller means for communicating with the memory means, for generating an SDRAM clock signal, for receiving a bi-directional sampling clock signal (DQS) that is generated based on the SDRAM clock signal, and for reading data from the memory means based on the DQS, wherein the SDRAM clock signal emulates the DQS.
 13. A memory system comprising: memory means for including Synchronous Dynamic Random Access Memory (SDRAM); memory controller means for communicating with the memory means, for generating an SDRAM clock signal, for receiving a bi-directional sampling clock signal (DQS) that is generated based on the SDRAM clock signal, and for reading data from the memory means based on the DQS; and logic means, connected between the memory means and the memory controller means, for aligning the DQS to the data based on a delay.
 14. The memory system of claim 13 wherein the logic means includes at least one programmable delay element.
 15. A method for operating a memory controller to interface with each of Synchronous Dynamic Random Access Memory (SDRAM) and Double Data Rate SDRAM (DDR) comprising: providing SDRAM; generating the SDRAM clock signal with the memory controller based on a buffer clock signal; receiving a bi-directional sampling clock signal (DQS) that is generated based on the SDRAM clock signal at the memory controller; and reading data from the SDRAM based on the DQS.
 16. The method of claim 15 wherein the reading the data from the SDRAM includes reading the data further based on at least one of the SDRAM clock signal and the buffer clock signal.
 17. The method of claim 15 wherein further comprising writing the data to the SDRAM based on at least one of the SDRAM clock signal and the buffer clock signal.
 18. The method of claim 15 further comprising generating the buffer clock signal with a clock distribution module.
 19. A method for operating a memory controller to interface with each of Synchronous Dynamic Random Access Memory (SDRAM) and Double Data Rate SDRAM (DDR) comprising: providing SDRAM; generating an SDRAM clock signal with the memory controller; receiving a bi-directional sampling clock signal (DQS) that is generated based on the SDRAM clock signal at the memory controller; and reading data from the SDRAM based on the DQS, wherein the SDRAM clock signal emulates the DQS.
 20. A method for operating a memory controller to interface with each of Synchronous Dynamic Random Access Memory (SDRAM) and Double Data Rate SDRAM (DDR) comprising: providing SDRAM; generating an SDRAM clock signal with the memory controller; receiving a bi-directional sampling clock signal (DQS) that is generated based on the SDRAM clock signal at the memory controller; reading data from the SDRAM based on the DQS; and aligning the DQS to the data based on a delay. 